JavaScript Cloud Native Development Cookbook by John Gilbert
Author: John Gilbert , Date: October 18, 2018
, Views: 1356
$ sls invoke -f load -r us-east-1 -s $MY_STAGE -d '{"id":"44444444-7777-1111-1111-000000000000","name":"thing one"}'
{
"ETag": "\"3f4ca01316d6f88052a940ab198b2dc7\""
}
Invoke the endpoint shown in the stack output with the following curl commands:
$ curl -v -H "Authorization: Bearer 1234567890" https://<see stack output>.cloudfront.net/things/44444444-7777-1111-1111-000000000000 | json_pp
...
> Authorization: Bearer 1234567890
>
< HTTP/1.1 200 OK
...
{
"name" : "thing one",
"id" : "44444444-7777-1111-1111-000000000000"
}
Copyright Disclaimer:
This site does not store any files on its server. We only index and link
to content provided by other sites. Please contact the content providers
to delete copyright contents if any and email us, we'll remove relevant
links or contents immediately.